package com.prs.crm.domain.taskmanager;


import java.util.Date;
import java.util.List;
import java.util.Set;

import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.Table;

import org.hibernate.annotations.Cascade;

import com.prs.crm.domain.Attachment;
import com.prs.crm.domain.BaseEntity;
import com.prs.crm.domain.hr.Person;
/***
 * 
 * @author Yanghao
 *	2012-8-15 9:29:23 分配任务
 */
@Entity
@Table(name="tm_taskallot")
public class TaskAllot extends BaseEntity{

	private static final long serialVersionUID = 1L;
	@Id
	@GeneratedValue(strategy=GenerationType.AUTO)
	private Integer id;
	private String title;
	/**任务分配人*/
	@ManyToOne
	private Person allotPerson;
	/**任务责任人*/
	@ManyToOne
	private Person dutyPerson;
	/**任务协办人*/
	private String doPerson;
	private String doPersonId;
	/**任务参与人*/
	private String consultPerson;
	private String consultPersonId;
	/**任务发布人*/
	private String releasePerson;
	/**代理分配人*/
	private String agencyAllotPerson;
	/**是否需要需要审核*/
	private String isApp;
	/**是否需要打分*/
	private String grade;
	/**任务时间*/
	private Date startDate;
	private String startTime;
	private Date endDate;
	private String endTime;
	/**提醒接收人设置*/
	private Boolean remindAllotPerosn;
	private Boolean remindReleasePerson;
	private Boolean remindDutyPerson;
	private Boolean remindDoPerson;
	private Boolean remindConsultPerson;
	/**发送方式*/
	private Boolean sendSysInfo;
	private Boolean sendMobile;
	private Boolean sendEmail;
	/**提醒设置*/
	private Boolean startRemind;
	private Boolean endRemind;
	private Boolean dueRemind;
	/**任务内容*/
	private String content;
	@ManyToOne
	private TaskType taskType;
	@ManyToOne(fetch=FetchType.EAGER)
	@Cascade({org.hibernate.annotations.CascadeType.ALL,org.hibernate.annotations.CascadeType.DELETE_ORPHAN})
	private Attachment attach; 
	@ManyToOne(fetch=FetchType.EAGER)
	private TaskAllot parent;
	@OneToMany(mappedBy="parent")
	private Set<TaskAllot> childs;
	/**参与人进度*/
	private String sonsultPlan;
	/**状态*/
	private Integer state;
	private Integer doState;
	private String doType;
	private String doFinishTime;
	private String type;
	private String stateName;
	private String finishTime;
	private String idea;
	private String reason;
	private String dispose;
	private String finishCheck;
	private Integer point;
	private String checkDate;
	private String showState;
	@OneToMany(mappedBy="taskAllot",fetch=FetchType.LAZY)
	@Cascade({org.hibernate.annotations.CascadeType.ALL,org.hibernate.annotations.CascadeType.DELETE_ORPHAN})
	private List<StateDispose> stateDispose;
	@Cascade({org.hibernate.annotations.CascadeType.ALL,org.hibernate.annotations.CascadeType.DELETE_ORPHAN})
	@OneToMany(mappedBy="taskAllot",fetch=FetchType.LAZY)
	private List<DelayApply> delayAppliy;
	
	/**任务反馈*/
	private String feedbackContent;
	private String seePersonName;
	private String seePersonNameId;	
	@ManyToOne(fetch=FetchType.LAZY)
	@Cascade({org.hibernate.annotations.CascadeType.ALL,org.hibernate.annotations.CascadeType.DELETE_ORPHAN})
	private Attachment attach1; 
	@ManyToOne
	private PersonalTaskResult personalTaskResult;
	@ManyToOne
	private DeptTaskResult deptTaskResult;
	/**
	 * 1:1day
	 * 2:2day
	 */
	private String showimg;
	
	public String getShowimg() {
		return showimg;
	}
	public void setShowimg(String showimg) {
		this.showimg = showimg;
	}
	public String getShowState() {
		return showState;
	}
	public void setShowState(String showState) {
		this.showState = showState;
	}
	public DeptTaskResult getDeptTaskResult() {
		return deptTaskResult;
	}
	public void setDeptTaskResult(DeptTaskResult deptTaskResult) {
		this.deptTaskResult = deptTaskResult;
	}
	public PersonalTaskResult getPersonalTaskResult() {
		return personalTaskResult;
	}
	public void setPersonalTaskResult(PersonalTaskResult personalTaskResult) {
		this.personalTaskResult = personalTaskResult;
	}
	public String getFeedbackContent() {
		return feedbackContent;
	}
	public void setFeedbackContent(String feedbackContent) {
		this.feedbackContent = feedbackContent;
	}
	public String getSeePersonName() {
		return seePersonName;
	}
	public void setSeePersonName(String seePersonName) {
		this.seePersonName = seePersonName;
	}
	public String getSeePersonNameId() {
		return seePersonNameId;
	}
	public void setSeePersonNameId(String seePersonNameId) {
		this.seePersonNameId = seePersonNameId;
	}
	public Attachment getAttach1() {
		return attach1;
	}
	public void setAttach1(Attachment attach1) {
		this.attach1 = attach1;
	}
	public String getFinishCheck() {
		return finishCheck;
	}
	public void setFinishCheck(String finishCheck) {
		this.finishCheck = finishCheck;
	}
	public Integer getPoint() {
		return point;
	}
	public void setPoint(Integer point) {
		this.point = point;
	}
	public String getCheckDate() {
		return checkDate;
	}
	public void setCheckDate(String checkDate) {
		this.checkDate = checkDate;
	}
	public String getSonsultPlan() {
		return sonsultPlan;
	}
	public void setSonsultPlan(String sonsultPlan) {
		this.sonsultPlan = sonsultPlan;
	}
	public List<DelayApply> getDelayAppliy() {
		return delayAppliy;
	}
	public void setDelayAppliy(List<DelayApply> delayAppliy) {
		this.delayAppliy = delayAppliy;
	}
	public List<StateDispose> getStateDispose() {
		return stateDispose;
	}
	public void setStateDispose(List<StateDispose> stateDispose) {
		this.stateDispose = stateDispose;
	}
	public String getDoType() {
		return doType;
	}
	public void setDoType(String doType) {
		this.doType = doType;
	}
	public String getDoFinishTime() {
		return doFinishTime;
	}
	public void setDoFinishTime(String doFinishTime) {
		this.doFinishTime = doFinishTime;
	}
	public String getIdea() {
		return idea;
	}
	public void setIdea(String idea) {
		this.idea = idea;
	}
	public String getReason() {
		return reason;
	}
	public void setReason(String reason) {
		this.reason = reason;
	}
	public String getDispose() {
		return dispose;
	}
	public void setDispose(String dispose) {
		this.dispose = dispose;
	}
	public String getFinishTime() {
		return finishTime;
	}
	public void setFinishTime(String finishTime) {
		this.finishTime = finishTime;
	}
	public Integer getDoState() {
		return doState;
	}
	public void setDoState(Integer doState) {
		this.doState = doState;
	}
	public String getType() {
		return type;
	}
	public void setType(String type) {
		this.type = type;
	}
	public Boolean getRemindConsultPerson() {
		return remindConsultPerson;
	}
	public void setRemindConsultPerson(Boolean remindConsultPerson) {
		this.remindConsultPerson = remindConsultPerson;
	}
	public Integer getState() {
		return state;
	}
	public void setState(Integer state) {
		this.state = state;
	}
	public String getStateName() {
		return stateName;
	}
	public void setStateName(String stateName) {
		this.stateName = stateName;
	}
	public String getGrade() {
		return grade;
	}
	public void setGrade(String grade) {
		this.grade = grade;
	}
	public String getStartTime() {
		return startTime;
	}
	public void setStartTime(String startTime) {
		this.startTime = startTime;
	}
	public Date getStartDate() {
		return startDate;
	}
	public void setStartDate(Date startDate) {
		this.startDate = startDate;
	}
	public Date getEndDate() {
		return endDate;
	}
	public void setEndDate(Date endDate) {
		this.endDate = endDate;
	}
	public String getEndTime() {
		return endTime;
	}
	public void setEndTime(String endTime) {
		this.endTime = endTime;
	}
	public Boolean getRemindAllotPerosn() {
		return remindAllotPerosn;
	}
	public void setRemindAllotPerosn(Boolean remindAllotPerosn) {
		this.remindAllotPerosn = remindAllotPerosn;
	}
	public Boolean getRemindReleasePerson() {
		return remindReleasePerson;
	}
	public void setRemindReleasePerson(Boolean remindReleasePerson) {
		this.remindReleasePerson = remindReleasePerson;
	}
	public Boolean getRemindDutyPerson() {
		return remindDutyPerson;
	}
	public void setRemindDutyPerson(Boolean remindDutyPerson) {
		this.remindDutyPerson = remindDutyPerson;
	}
	public Boolean getRemindDoPerson() {
		return remindDoPerson;
	}
	public void setRemindDoPerson(Boolean remindDoPerson) {
		this.remindDoPerson = remindDoPerson;
	}
	public Boolean getSendSysInfo() {
		return sendSysInfo;
	}
	public void setSendSysInfo(Boolean sendSysInfo) {
		this.sendSysInfo = sendSysInfo;
	}
	public Boolean getSendMobile() {
		return sendMobile;
	}
	public void setSendMobile(Boolean sendMobile) {
		this.sendMobile = sendMobile;
	}
	public Boolean getSendEmail() {
		return sendEmail;
	}
	public void setSendEmail(Boolean sendEmail) {
		this.sendEmail = sendEmail;
	}
	public Boolean getStartRemind() {
		return startRemind;
	}
	public void setStartRemind(Boolean startRemind) {
		this.startRemind = startRemind;
	}
	public Boolean getEndRemind() {
		return endRemind;
	}
	public void setEndRemind(Boolean endRemind) {
		this.endRemind = endRemind;
	}
	public Boolean getDueRemind() {
		return dueRemind;
	}
	public void setDueRemind(Boolean dueRemind) {
		this.dueRemind = dueRemind;
	}
	public String getContent() {
		return content;
	}
	public void setContent(String content) {
		this.content = content;
	}
	public TaskType getTaskType() {
		return taskType;
	}
	public void setTaskType(TaskType taskType) {
		this.taskType = taskType;
	}
	public Attachment getAttach() {
		return attach;
	}
	public void setAttach(Attachment attach) {
		this.attach = attach;
	}
	public TaskAllot getParent() {
		return parent;
	}
	public void setParent(TaskAllot parent) {
		this.parent = parent;
	}
	public Set<TaskAllot> getChilds() {
		return childs;
	}
	public void setChilds(Set<TaskAllot> childs) {
		this.childs = childs;
	}
	public String getIsApp() {
		return isApp;
	}
	public void setIsApp(String isApp) {
		this.isApp = isApp;
	}
	public Integer getId() {
		return id;
	}
	public void setId(Integer id) {
		this.id = id;
	}
	public String getTitle() {
		return title;
	}
	public void setTitle(String title) {
		this.title = title;
	}
	public Person getAllotPerson() {
		return allotPerson;
	}
	public void setAllotPerson(Person allotPerson) {
		this.allotPerson = allotPerson;
	}
	public Person getDutyPerson() {
		return dutyPerson;
	}
	public void setDutyPerson(Person dutyPerson) {
		this.dutyPerson = dutyPerson;
	}
	public String getDoPerson() {
		return doPerson;
	}
	public void setDoPerson(String doPerson) {
		this.doPerson = doPerson;
	}
	public String getDoPersonId() {
		return doPersonId;
	}
	public void setDoPersonId(String doPersonId) {
		this.doPersonId = doPersonId;
	}
	public String getConsultPerson() {
		return consultPerson;
	}
	public void setConsultPerson(String consultPerson) {
		this.consultPerson = consultPerson;
	}
	public String getConsultPersonId() {
		return consultPersonId;
	}
	public void setConsultPersonId(String consultPersonId) {
		this.consultPersonId = consultPersonId;
	}
	public String getReleasePerson() {
		return releasePerson;
	}
	public void setReleasePerson(String releasePerson) {
		this.releasePerson = releasePerson;
	}
	public String getAgencyAllotPerson() {
		return agencyAllotPerson;
	}
	public void setAgencyAllotPerson(String agencyAllotPerson) {
		this.agencyAllotPerson = agencyAllotPerson;
	}
}
